# -*- coding: utf-8 -*-


class TaxationMixin(object):
    __slots__ = ()

    def asdict(self):
        import pyshare.dal.dal_adapters.character_adapters as cadts
        indicator = cadts.get_indicators(self._record.RoleGuid)
        grains_dict = self.grains.asdict()
        grains_dict.update({'SingleValue': indicator.grains_taxation})
        silvers_dict = self.silvers.asdict()
        silvers_dict.update({'SingleValue': indicator.silvers_taxation})
        soldiers_dict = self.soldiers.asdict()
        soldiers_dict.update({'SingleValue': indicator.soldiers_taxation})
        return {
            'Grains': grains_dict,
            'Silvers': silvers_dict,
            'Soldiers': soldiers_dict,
        }
